package com.zqxx.examine.management.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zqxx.examine.common.utils.Page;
import com.zqxx.examine.management.persistence.NewsMapper;
import com.zqxx.examine.model.news.News;

@Service
public class NewsService 
{
  @Autowired
  private NewsMapper newsMapper;
  
  public List<News> getNewsList(Page<News> page)
  {
    return this.newsMapper.getNewsList(page);
  }
  
  public News getNewsById(int newsId)
  {
    return this.newsMapper.getNewsById(newsId);
  }
  
  public void addNews(News news)
  {
    this.newsMapper.addNews(news);
  }
}
